keyhandler: rework keyhandler infrastructure
authorAndrew Cooper <andrew.cooper3@citrix.com>
Fri, 25 Sep 2015 07:06:34 +0000 (09:06 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 25 Sep 2015 07:06:34 +0000 (09:06 +0200)
commitf96b29118a3ce99b1eb45e79564d5af382395607
tree6724b41dbc9bb1ac8c22b1d005794ad8e67b3635
parentcf6d39f81992c29a637c603dbabf1e21a0ea563f
keyhandler: rework keyhandler infrastructure

struct keyhandler does not contain much information, and requires a lot
of boilerplate to use.  It is far more convenient to have
register_keyhandler() take each piece of information a parameter,
especially when introducing temporary debugging keyhandlers.

This in turn allows struct keyhandler itself to become private to
keyhandler.c and for the key_table to become more efficient.

key_table doesn't need to contain 256 entries; all keys are ASCII which
limits them to 7 bits of index, rather than 8.  It can also become a
straight array, rather than an array of pointers.  The overall effect of
this is the key_table grows in size by 50%, but there are no longer
24-byte keyhandler structures all over the data section.

All of the key_table entries in keyhandler.c can be initialised at
compile time rather than runtime.

Signed-off-by: Andrew Cooper <andrew.cooper3@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
26 files changed:
xen/arch/x86/acpi/cpu_idle.c
xen/arch/x86/hvm/irq.c
xen/arch/x86/hvm/svm/vmcb.c
xen/arch/x86/hvm/vmx/vmcs.c
xen/arch/x86/io_apic.c
xen/arch/x86/irq.c
xen/arch/x86/mm/p2m-ept.c
xen/arch/x86/mm/shadow/common.c
xen/arch/x86/msi.c
xen/arch/x86/nmi.c
xen/arch/x86/numa.c
xen/arch/x86/time.c
xen/common/event_channel.c
xen/common/grant_table.c
xen/common/kexec.c
xen/common/keyhandler.c
xen/common/page_alloc.c
xen/common/timer.c
xen/drivers/char/console.c
xen/drivers/passthrough/amd/iommu_intr.c
xen/drivers/passthrough/iommu.c
xen/drivers/passthrough/pci.c
xen/drivers/passthrough/vtd/extern.h
xen/drivers/passthrough/vtd/iommu.c
xen/drivers/passthrough/vtd/utils.c
xen/include/xen/keyhandler.h